package com.config.tomcat;

import org.apache.catalina.connector.Connector;
import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer;
import org.springframework.stereotype.Component;

/**
 * @author chengyadong
 * @date 2023/9/20 15:34
 * @description tomcat connector组件初始化时可进行自定义
 */
@Component
public class TomcatConnectorCustomizerTest implements TomcatConnectorCustomizer {
	@Override
	public void customize(Connector connector) {
		connector.setPort(8088);
		System.out.println("连接端口:="+connector.getPort());
	}
}
